<template>
  <van-search v-model="value" placeholder="请输入标题或内容" />

  <van-button type="primary" plain size="mini"> 心理健康 </van-button>
  <van-button type="success" plain size="mini"> 人格气质 </van-button>
  <van-button type="default" plain size="mini"> 社会适应 </van-button>
  <van-button type="warning" plain size="mini"> 情绪评定 </van-button>
  <van-button type="danger" plain size="mini"> 自我能力 </van-button>

  <StageDialog
    v-model:visible="show"
    v-model:active="active"
    @onItemClick="onItemClick"
  />
</template>

<script>
import { defineComponent, ref } from 'vue'
import { useRouter } from 'vue-router'
import StageDialog from '/@/components/StageDialog.vue'

export default defineComponent({
  components: {
    StageDialog,
  },
  setup() {
    const show = ref(true)

    const value = ref('')

    const router = useRouter()

    const active = ref('学前')

    return {
      show,
      value,
      active,
      onItemClick({ name }) {
        router.push({ name: 'EvaluateDetails', params: { stage: name } })
      },
    }
  },
})
</script>

<style lang="less" scoped></style>
